package cn.antscrpt.antLib.test 
{
	
// forked from checkmate's fladdict challenge for professionals
/**
 * Theme:
 * Play with BitmapPatterBuilder.
 * Purpose of this trial is to find the possibility of the dot pattern.
 *
 * by Takayuki Fukatsu aka fladdict
 **/

    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Graphics;
    import flash.display.Sprite;
    import flash.display.StageScaleMode;
    
    /**
    /* 自作のパターンジェネレーターを使って投稿
     * http://wonderfl.net/code/17e4d5d9466ab1b35c3ae54267d95eed3fa4fbcc
     * ※パターンだけのものですみません。。
     */
    public class EX37 extends Sprite {
        public function EX37() {
            stage.scaleMode = StageScaleMode.NO_SCALE;
            
            //generate bitmap pattern.
            var pattern:BitmapData = sample1();
            
            var g:Graphics = graphics;
            g.beginBitmapFill(pattern);
            g.drawRect(0,0,480,480);
            g.endFill();
        }
        
        //most simple patern
        public function sample1():BitmapData{
            return BitmapPatternBuilder.build(
[
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,14,15,16,17,18,19,20,21,22,22,23,24,25,26,27,28,29,30,31,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,34,35,36,37,38,39,40,41,42,43,42,44,45,46,47,48,49,50,51,52,53,54,55,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,58,59,36,60,61,62,63,64,65,66,67,68,69,70,71,72,72,73,74,75,75,76,77,78,79,80,81,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,84,85,86,87,88,8,89,90,91,92,93,70,72,94,74,75,75,75,75,75,75,75,75,95,96,97,98,99,100,101,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,103,104,105,106,107,108,109,110,111,112,113,114,72,74,75,75,75,75,75,75,75,75,75,75,75,75,75,115,76,116,117,118,119,120,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,122,123,124,125,126,127,128,129,130,75,72,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,95,96,131,132,133,134,135,136,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,138,139,140,140,141,127,142,143,144,72,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,96,145,146,147,148,149,150,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,151,152,153,154,154,155,41,156,71,71,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,157,158,159,160,161,162,163,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,165,166,167,168,169,170,171,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,157,172,173,174,175,176,177,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,181,182,183,184,185,75,75,75,75,75,75,75,75,75,75,185,186,187,187,187,187,187,95,75,75,75,75,75,75,75,75,75,157,188,189,190,175,191,192,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,194,0,0,0,0,195,196,157,75,75,75,75,75,75,75,95,187,187,197,198,199,200,201,202,203,75,95,75,75,75,75,75,75,75,75,115,204,146,160,190,205,206,207,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,209,210,211,75,75,95,115,186,187,212,213,214,215,216,217,218,219,220,221,222,223,224,75,75,75,75,75,75,75,75,96,225,189,159,159,226,227,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,229,230,211,115,231,232,233,234,235,236,237,238,239,193,0,0,0,240,241,242,243,244,75,75,75,75,75,75,75,115,245,246,160,159,247,190,248,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,249,250,251,252,253,254,255,256,257,0,0,0,0,0,0,0,0,0,0,258,259,260,261,75,75,75,75,75,75,75,115,262,173,159,159,263,264,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,265,266,267,268,0,0,0,269,270,271,272,273,274,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,276,260,261,75,75,75,75,75,75,157,277,189,159,159,278,279,280,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,283,284,285,286,0,0,287,288,289,290,291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,292,293,75,75,75,75,75,75,115,145,160,159,159,159,263,294,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,295,296,297,0,0,298,299,0,0,0,0,0,0,300,301,302,303,304,0,0,0,0,0,0,0,0,0,0,0,0,0,305,306,307,75,75,75,75,75,95,308,309,160,159,159,310,311,192,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,312,313,0,314,315,316,0,0,317,318,319,0,0,0,320,321,282,322,323,324,325,326,0,0,0,0,0,0,0,0,0,0,0,0,0,327,328,75,75,75,75,75,95,114,329,330,159,159,159,205,331,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,332,333,0,334,335,0,0,0,336,322,303,0,337,338,339,334,340,341,0,342,335,343,344,0,0,0,0,0,0,0,0,0,0,0,0,345,346,261,75,75,75,75,75,115,262,189,159,159,159,347,348,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,349,350,351,352,353,0,0,0,0,354,355,356,299,282,357,358,0,0,0,0,0,359,360,361,0,0,0,0,0,0,0,0,0,0,0,362,363,364,75,75,75,75,75,115,365,189,159,159,159,117,366,136,0,0], 
    [0,0,0,0,0,0,0,0,0,1,367,368,0,0,0,0,0,0,0,369,370,282,371,372,0,0,0,0,0,0,0,373,374,375,0,0,0,0,0,0,0,0,0,0,0,376,377,307,75,75,75,75,75,157,378,189,159,159,159,379,380,381,0,0], 
    [0,0,0,0,0,0,0,0,0,382,383,0,0,0,0,0,0,0,0,0,384,385,361,0,0,0,0,0,0,0,0,0,386,387,0,0,0,0,0,0,0,0,0,0,0,388,389,307,75,75,75,75,75,157,390,189,159,159,159,159,347,391,0,0], 
    [0,0,0,0,0,0,0,0,382,392,393,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,394,318,373,0,0,0,0,0,0,0,0,0,0,395,396,397,75,75,75,75,75,157,390,189,159,159,159,159,398,399,0,0], 
    [0,0,0,0,0,0,0,400,401,402,403,1,0,0,0,369,404,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,407,408,0,0,0,0,0,0,0,0,0,0,409,410,261,75,75,75,75,75,157,378,189,159,159,159,159,263,411,0,0], 
    [0,0,0,0,0,0,412,413,414,75,415,416,0,0,0,417,282,418,419,0,0,0,0,0,0,0,0,0,0,0,0,0,0,337,0,0,0,0,0,0,0,0,0,0,0,420,328,75,75,75,75,75,75,115,365,189,159,159,159,159,161,421,0,0], 
    [0,0,0,0,0,422,423,415,224,75,424,425,426,0,0,427,282,428,0,0,0,0,0,0,342,385,429,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,431,415,75,75,75,75,75,75,115,432,189,159,159,159,159,433,434,0,0], 
    [0,0,0,0,435,436,424,75,75,75,75,293,437,438,0,439,440,441,0,0,0,0,0,0,284,282,321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,442,443,261,75,75,75,75,75,75,95,444,173,159,159,159,159,433,445,0,0], 
    [0,0,0,446,447,448,449,75,75,75,75,75,328,259,194,0,0,0,0,0,0,0,0,406,450,282,451,452,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,453,454,424,75,75,75,75,75,75,95,114,455,173,159,159,159,159,433,434,0,0], 
    [0,0,0,456,457,75,75,75,458,459,244,75,75,328,460,461,0,0,0,0,0,0,0,0,462,463,301,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,464,465,75,75,75,75,75,75,75,95,466,467,160,159,159,159,159,161,468,0,0], 
    [0,0,469,470,471,75,472,473,474,475,476,244,75,75,293,477,478,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,438,479,328,75,75,75,75,75,75,75,75,95,204,146,160,159,159,159,159,263,480,0,0], 
    [0,481,482,483,244,484,485,486,487,488,489,490,75,75,491,424,415,492,493,494,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,495,496,328,244,75,75,75,75,75,75,75,75,115,497,159,159,159,159,159,159,398,498,0,0], 
    [0,163,499,500,501,502,503,504,505,506,507,244,75,75,244,75,261,508,424,509,510,511,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,512,393,513,508,75,75,75,75,75,75,75,75,75,75,157,514,173,159,159,159,159,159,263,515,0,0], 
    [0,516,517,518,519,520,521,522,522,523,244,75,75,473,524,449,75,75,261,525,465,526,527,528,529,305,1,0,0,0,0,0,0,0,337,530,531,532,533,328,397,75,75,75,75,75,75,75,75,75,75,75,157,225,189,159,159,159,159,159,175,534,0,0], 
    [0,535,536,537,538,539,540,75,75,75,75,244,522,541,542,543,490,75,75,75,75,397,525,328,544,545,546,547,548,549,550,551,552,553,554,526,555,260,397,75,75,75,75,75,75,75,75,75,75,75,75,75,556,262,173,159,159,159,159,379,379,248,0,0], 
    [557,558,559,560,561,490,244,75,75,75,562,458,563,564,565,566,562,75,75,75,75,75,75,75,261,397,415,293,328,293,260,293,328,567,415,397,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,95,568,146,160,159,159,159,159,247,569,570,0,0], 
    [571,572,573,574,575,472,75,75,75,562,576,577,488,578,579,523,75,75,75,244,490,579,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,157,580,189,159,159,159,159,159,581,582,583,0,0], 
    [584,585,586,587,588,589,157,75,458,244,590,591,566,592,75,75,75,75,523,244,593,594,595,244,75,75,459,522,458,75,75,75,75,244,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,556,596,189,159,159,159,159,159,597,598,0,0,0], 
    [599,600,601,602,603,604,605,95,522,606,607,475,522,75,75,75,75,472,608,609,520,563,75,244,75,490,610,611,612,458,75,75,459,562,244,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,157,145,160,159,159,159,159,159,159,263,613,0,0,0], 
    [614,615,616,617,159,189,618,619,620,520,621,592,75,75,75,75,472,622,623,624,625,522,244,75,490,626,627,628,629,523,75,579,620,630,566,459,75,75,75,75,75,75,75,75,75,75,75,75,75,75,115,631,189,159,159,159,159,159,159,205,632,0,0,0], 
    [0,633,634,635,159,159,189,636,637,638,562,244,75,75,75,473,639,623,640,244,579,75,75,490,641,642,643,75,562,75,562,644,628,630,476,458,75,75,75,75,75,75,75,75,75,75,75,75,75,96,514,645,159,159,159,159,159,159,278,646,647,0,0,0], 
    [0,648,649,159,159,159,650,617,651,652,653,75,75,75,244,244,654,609,244,459,75,75,244,449,655,656,592,458,75,75,490,657,658,595,659,75,75,75,75,75,75,75,75,75,75,75,75,75,115,204,309,160,159,159,159,159,159,159,660,661,662,0,0,0], 
    [0,663,664,160,159,159,635,665,666,667,668,669,75,75,490,670,520,671,579,75,75,75,490,505,607,672,523,75,75,562,673,674,621,522,75,75,75,75,75,75,75,75,75,75,75,75,75,115,114,675,189,159,159,159,159,159,159,159,175,676,0,0,0,0], 
    [0,677,678,679,159,159,635,635,680,681,682,568,96,683,562,684,685,522,75,75,75,75,472,686,687,490,75,75,75,490,688,689,690,458,75,75,75,75,75,75,75,75,75,75,75,75,157,691,262,189,159,159,159,159,159,159,159,159,205,692,0,0,0,0], 
    [0,0,693,694,159,159,159,695,696,697,698,699,580,700,701,702,703,490,75,75,75,244,75,704,705,522,75,75,75,522,706,707,708,75,75,75,75,75,75,75,75,75,75,75,95,96,709,710,189,159,159,159,159,159,159,159,159,278,646,647,0,0,0,0], 
    [0,0,711,712,175,190,159,713,714,715,716,717,173,718,719,720,721,722,75,75,75,458,644,723,626,490,75,75,75,579,724,725,490,75,75,75,75,75,75,75,75,75,95,157,95,172,146,189,159,159,159,159,159,159,159,159,159,581,726,583,0,0,0,0], 
    [0,0,0,727,728,175,190,159,729,730,731,732,733,698,734,735,736,737,95,157,157,722,738,702,641,708,75,75,75,473,739,740,522,75,75,75,75,75,75,75,115,157,75,741,742,189,160,159,159,159,159,159,159,159,159,159,159,205,743,0,0,0,0,0], 
    [0,0,0,0,744,745,263,159,746,747,748,749,695,713,750,751,752,753,742,754,131,737,755,702,756,757,157,115,76,758,577,759,760,95,95,115,157,157,157,114,761,277,710,173,173,159,159,159,159,159,159,159,159,159,159,159,380,762,763,0,0,0,0,0], 
    [0,0,0,0,0,764,765,766,767,713,768,769,770,771,772,773,774,775,173,189,173,776,777,751,778,779,780,781,782,783,784,785,786,787,709,497,741,788,378,455,159,189,789,159,159,159,159,159,159,159,159,159,159,159,159,159,175,790,0,0,0,0,0,0], 
    [0,0,0,0,0,0,56,791,792,597,746,746,159,159,729,793,794,795,159,159,159,796,797,773,798,799,173,159,800,801,802,803,804,805,132,159,173,189,189,330,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,278,806,807,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,808,809,398,810,159,159,811,812,813,814,635,159,159,733,815,816,817,695,159,159,160,729,818,819,820,821,160,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,263,822,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,823,824,825,694,826,635,814,827,159,159,159,159,159,635,828,829,830,159,159,159,830,831,832,833,834,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,835,836,837,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,838,839,840,433,841,842,159,159,159,159,159,159,843,733,159,159,159,159,159,834,844,845,635,635,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,247,846,847,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,208,848,849,850,398,597,851,159,159,159,159,159,159,159,159,159,159,746,750,852,665,635,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,117,175,853,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,854,855,856,857,858,859,581,860,159,159,159,159,159,159,159,770,713,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,161,861,862,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,863,864,865,866,867,205,868,869,310,278,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,860,846,263,856,163,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,823,870,871,872,873,874,247,161,205,841,175,869,117,310,247,278,278,278,278,278,278,875,876,877,161,205,380,878,879,880,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,881,882,163,883,884,885,886,873,191,887,888,889,792,597,597,890,660,888,661,149,891,892,893,494,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,894,895,896,897,163,898,899,900,901,902,903,904,193,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
],
[0xffffffff, 0xfffefdfd, 0xfffdecf0, 0xfffdd7e0, 0xfffdc5d3, 0xfffcb7c8, 0xfffdb1c4, 0xfffdb4c5, 0xfffcbecd, 0xfffdccd8, 0xfffddae3, 0xfffeebf0, 0xfffffafc, 0xfffeffff, 0xfffdf4f6, 0xfffdc0cf, 0xfffc7f9e, 0xfffd4b76, 0xfffd3766, 0xfffe295c, 0xfffe2256, 0xfffe2054, 0xffff1f54, 0xffff2056, 0xffff245b, 0xffff2c61, 0xfffe3667, 0xfffc4871, 0xfff86381, 0xfff68a9b, 0xfff4b3b8, 0xffeacbcb, 0xfff6eeee, 0xfffce7ec, 0xfffc8fa9, 0xfffd3665, 0xfffd194f, 0xfffd2e5f, 0xfffe3d6b, 0xfffe2659, 0xffff275a, 0xffff285c, 0xffff295d, 0xffff295f, 0xfffb2956, 0xfff5274a, 0xffed263d, 0xffe82432, 0xffe32128, 0xffe01d21, 0xffdf1a1c, 0xffdf1d1e, 0xffcd1e1e, 0xffb92e2d, 0xffc26564, 0xffe1b5b4, 0xfffaf4f4, 0xfffdeaef, 0xfffc88a4, 0xfffd295c, 0xfffc698d, 0xfffccbd7, 0xfffdfefe, 0xfffbdce4, 0xfffd3263, 0xffff265c, 0xffff295e, 0xfffb2955, 0xfff12845, 0xffe72734, 0xffe02729, 0xffde2725, 0xffdd2724, 0xffde2726, 0xffdf2726, 0xffdf2727, 0xffe12727, 0xffdd2222, 0xffc11313, 0xffa80e0d, 0xffaf302f, 0xffd18988, 0xfff4e4e4, 0xfffcbccb, 0xfffc3b69, 0xfffe0f48, 0xfffc4773, 0xfffcd5df, 0xfffcffff, 0xfffd7293, 0xfffe4573, 0xffff285d, 0xfff82951, 0xffea273a, 0xffdd2725, 0xffe02727, 0xffe32828, 0xffd82424, 0xffb61514, 0xffa00707, 0xffac2121, 0xffd08585, 0xfff8efef, 0xfffb9db4, 0xfffe2156, 0xffff1a51, 0xfffc6f91, 0xfffcfefe, 0xfffbccd8, 0xfffc4a75, 0xffff1d54, 0xffff1d56, 0xfff9234d, 0xffe92837, 0xffde2727, 0xffe12828, 0xffc52020, 0xffa71212, 0xffa20707, 0xffb12f2f, 0xffdfaeae, 0xfffdaec1, 0xfffe1f54, 0xffff2559, 0xffff2156, 0xfffca8bd, 0xfffba5ba, 0xfffe2257, 0xffff2058, 0xfffd2958, 0xffed283d, 0xffcf2222, 0xffab1817, 0xffa50f0f, 0xffa50b0a, 0xffc76a69, 0xfff9f0f0, 0xfffeeaef, 0xfffd3768, 0xffff2357, 0xffff295c, 0xfffe295b, 0xffff275d, 0xfff5294c, 0xffe3272d, 0xffd32323, 0xffac1818, 0xffa71615, 0xffa40807, 0xffb63d3c, 0xfff0dad9, 0xfffea9bd, 0xffff1c51, 0xffff2a5e, 0xffff2b61, 0xffff285e, 0xffef2841, 0xffe22828, 0xffd22322, 0xffa91717, 0xffa81717, 0xffa50b0b, 0xffae2828, 0xffebcdcd, 0xffce6f73, 0xffa30000, 0xffad000b, 0xffc1051c, 0xffdc1135, 0xfffb2856, 0xffec293c, 0xffdd2723, 0xffca2121, 0xffa71616, 0xffa91718, 0xffa50d0d, 0xffad2423, 0xffecd0cf, 0xffcb8482, 0xffc06f6d, 0xffd29d9b, 0xffce9894, 0xffb14d4b, 0xffac0708, 0xffdc2422, 0xffe02828, 0xffe22929, 0xffe32929, 0xffbb1d1c, 0xffa61616, 0xffa91818, 0xffb12f2e, 0xfff3e1e1, 0xfffdfbfb, 0xfffdf9f9, 0xffc27a79, 0xffad0405, 0xffda2324, 0xffce1a1a, 0xffc21010, 0xffb90909, 0xffb30404, 0xffb60808, 0xffc81718, 0xffd92525, 0xffa40909, 0xffbc4d4c, 0xfffcf9f9, 0xfffbf6f6, 0xffa52c2c, 0xffc41312, 0xffe42a2a, 0xffdc2323, 0xffc41010, 0xffaa0000, 0xff9d0101, 0xff9d100f, 0xffa52828, 0xffaf4242, 0xffba5e5e, 0xffad3f3f, 0xff960908, 0xffb00505, 0xffe02323, 0xffdf2828, 0xffc21f1e, 0xffa30807, 0xffd08483, 0xffd09393, 0xff9a0000, 0xffd62222, 0xffde2627, 0xffd82324, 0xffcb1818, 0xffb20303, 0xffa10808, 0xffad3c3b, 0xffc88282, 0xffe4c3c3, 0xfff5e8e8, 0xfff0e0e0, 0xffce8383, 0xffdc3535, 0xffde1b1c, 0xffdf2627, 0xffd72525, 0xffaa1717, 0xffa81414, 0xffeccece, 0xff9d1616, 0xff9d0000, 0xffb00e0d, 0xffac0b0b, 0xffa10202, 0xff960000, 0xff9b0e0e, 0xffbe6b6a, 0xffebd4d4, 0xfffaebea, 0xffe76e6e, 0xffdd1c1c, 0xffdf2626, 0xffb71b1b, 0xffa40a0a, 0xffc15b5a, 0xffaaaaaa, 0xff2b2b2b, 0xff363636, 0xffbfbfbf, 0xffc67777, 0xff8d0000, 0xff900000, 0xff8f0000, 0xff9e1515, 0xffc57575, 0xfff2e4e4, 0xffec8b8b, 0xffc6201f, 0xffa91616, 0xffa61211, 0xffe7c3c2, 0xffa5a5a5, 0xff000000, 0xff5f5f5f, 0xff4e4e4e, 0xff050505, 0xffc8c8c8, 0xfff9f3f3, 0xffc67576, 0xffb85655, 0xffd79d9c, 0xfffaf0f0, 0xffe97574, 0xffdd1b1b, 0xffc46161, 0xffebebeb, 0xff131313, 0xff747474, 0xff434343, 0xff3f3f3f, 0xffdee0e0, 0xff9c9c9c, 0xff7f7f7f, 0xff9d9d9d, 0xffe8e8e8, 0xfffae9e8, 0xffe13939, 0xffde2222, 0xffda2625, 0xffad1818, 0xffa81313, 0xffac2120, 0xfffdfaf9, 0xfffdfbfa, 0xff898989, 0xff151515, 0xffefefef, 0xffb8b8b8, 0xff030303, 0xffd8d8d8, 0xffdcdcdc, 0xff535353, 0xff0f0f0f, 0xff262626, 0xff0b0b0b, 0xff0c0c0c, 0xffb2b2b2, 0xffec8b8a, 0xffdd1a1a, 0xffb21a19, 0xffa71717, 0xffda9d9d, 0xfffaeeed, 0xfffffbfb, 0xff2a2a2a, 0xff6a6a6a, 0xfff0f0f0, 0xfffdfdfd, 0xff8a8a8a, 0xff010101, 0xffafafaf, 0xfff5f5f5, 0xfff3f3f3, 0xff020202, 0xffc0c0c0, 0xfff6cecd, 0xffde2424, 0xffa50c0b, 0xffc05858, 0xfff8e2e1, 0xfffffdfd, 0xfffefeff, 0xff8d8d8d, 0xffd5d5d5, 0xff4c4c4c, 0xff373737, 0xffd1d1d1, 0xff8b8b8b, 0xfffefefe, 0xff545454, 0xff272727, 0xfff9f9f9, 0xfffcebeb, 0xffe13534, 0xffdf2323, 0xffbb1c1c, 0xffb02c2c, 0xfff7d6d6, 0xfffffffe, 0xffd7d7d7, 0xff202020, 0xff343434, 0xffd4d4d4, 0xffdadada, 0xff060606, 0xffa2a2a2, 0xfffdf5f4, 0xffe23f3f, 0xffbd1d1d, 0xffa81515, 0xffa81616, 0xffedd1d0, 0xfffdf7f7, 0xfff4c7c7, 0xffededed, 0xffcfcfcf, 0xff555555, 0xff3a3a3a, 0xfffdf3f3, 0xffe23c3c, 0xffbe1d1d, 0xffe0adac, 0xffea7f7f, 0xffeb8989, 0xffb4b4b4, 0xfffae6e6, 0xffe03131, 0xffdf2424, 0xffa40908, 0xffd38a89, 0xfff8dddd, 0xffe45252, 0xffdc1010, 0xffe44f4f, 0xff737373, 0xffc9c9c9, 0xffeeeeee, 0xff404040, 0xffd0d0d0, 0xfff6cbcb, 0xffde2323, 0xffca7372, 0xfff4c6c6, 0xffe03434, 0xffdd1b1c, 0xffde1f1f, 0xfff2b3b3, 0xff494949, 0xff2f2f2f, 0xfffcfcfc, 0xffed9393, 0xffc56464, 0xfff4c4c3, 0xffde2a29, 0xffde2020, 0xffe24141, 0xfffbecec, 0xff767676, 0xff5b5b5b, 0xfff4f4f4, 0xfffefbfb, 0xffe34e4e, 0xffb81c1c, 0xffa50c0c, 0xffc25c5c, 0xfff7d3d3, 0xffdf3030, 0xffe66363, 0xfffdfafa, 0xfffafafa, 0xffd9d9d9, 0xfff6f6f6, 0xfff3b6b6, 0xffdd1e1e, 0xffb61b1a, 0xffc25959, 0xfffcf1f1, 0xffe24647, 0xffde1c1d, 0xffdf2827, 0xff161616, 0xff1a1a1a, 0xfff1f1f1, 0xfffcf0f1, 0xffe34646, 0xffb21a1a, 0xffea7d7d, 0xffdd1919, 0xffdf2527, 0xffe02427, 0xffe55f5f, 0xfffaeaea, 0xff989898, 0xff2e2e2e, 0xffe86f6e, 0xffdd1a1b, 0xffdc2626, 0xffaf1919, 0xffc56565, 0xfff6cece, 0xffde2525, 0xffdf2525, 0xffe02127, 0xffe02326, 0xffde2f28, 0xffdc3829, 0xffde2c28, 0xffe13d3c, 0xfff3bdbd, 0xffe97878, 0xffca7373, 0xfffbfdfc, 0xffd14e4d, 0xffdf1e1e, 0xffdf2226, 0xffda472a, 0xffd17e30, 0xffcd9532, 0xffcc9c33, 0xffd7592c, 0xffe02126, 0xffdf2728, 0xffe66463, 0xfff5c8c7, 0xfffefcfc, 0xfff8dcdb, 0xffe45959, 0xffd52424, 0xffd18585, 0xffb11615, 0xffde2425, 0xffe02527, 0xffd46a2e, 0xffcca033, 0xffd2792f, 0xffd94e2b, 0xffdb402a, 0xffde2f27, 0xffde1c1c, 0xffe45353, 0xffefa2a2, 0xfffae5e5, 0xfffae7e6, 0xffdf2c2b, 0xffcd2222, 0xffda9c9c, 0xffd99b9b, 0xffa30909, 0xffd31d22, 0xffd7692e, 0xffcc9d33, 0xffd9482b, 0xffe02026, 0xffe02327, 0xffdf2526, 0xffde1e1e, 0xffdf2e2e, 0xffe55959, 0xffee9595, 0xfff5c6c6, 0xfff9e4e4, 0xfff2b6b6, 0xffe76e6f, 0xffdf2f2f, 0xffe4b7b7, 0xffca6767, 0xffa10409, 0xffbb3a20, 0xffcfa134, 0xffd94c2b, 0xffe11e26, 0xffdb3e29, 0xffd08530, 0xffd6602d, 0xffdd2121, 0xffe03232, 0xffe45151, 0xffe87171, 0xffec8c8c, 0xfff0a1a1, 0xfff0acac, 0xfff0a2a2, 0xffec8d8d, 0xffe87372, 0xffe4504f, 0xffdd1d1c, 0xffe12728, 0xfffffefe, 0xffc04343, 0xffa40a0d, 0xffc0782b, 0xffd57d31, 0xffdf2427, 0xffd5632d, 0xffcc9e34, 0xffd27d30, 0xffdc3a29, 0xffde1b1b, 0xffda2525, 0xffac2020, 0xfff4e3e2, 0xfffff4f4, 0xffbb2f31, 0xffaa1f14, 0xffca9832, 0xffc84526, 0xffdf2927, 0xffd27b30, 0xffd8522b, 0xffe02227, 0xffcb2121, 0xffa71111, 0xffb23131, 0xfffbf4f4, 0xfffff0f0, 0xffba252a, 0xffb23e1b, 0xffcc9b33, 0xffab2319, 0xffd02022, 0xffd17c30, 0xffcd9432, 0xffe01f26, 0xffd6592c, 0xffd2732e, 0xffde2a27, 0xffb81b1b, 0xffa60e0e, 0xffbb4949, 0xfffff1f1, 0xffbe292c, 0xffb1391a, 0xffc06b29, 0xffa71516, 0xffb11919, 0xffdd2726, 0xffd5662d, 0xffcd9b33, 0xffdd3528, 0xffd08330, 0xffdd3428, 0xffd75b2c, 0xffdd3628, 0xffc86e6e, 0xfffff6f6, 0xffc63837, 0xffa50f10, 0xffa91516, 0xffbc1d1d, 0xffe22427, 0xffdc3b29, 0xffd8502b, 0xffdc3e29, 0xffcd9733, 0xffd08430, 0xffdc3728, 0xffd94d2b, 0xffcd9833, 0xffce9132, 0xffdb3f2a, 0xffd18130, 0xffb91c1b, 0xffd89998, 0xffce4747, 0xffa50e0e, 0xffa91617, 0xffc4181e, 0xffd6692e, 0xffd08731, 0xffdd3529, 0xffd2772f, 0xffda442a, 0xffcc9f33, 0xffd5672d, 0xffde2e28, 0xffa71716, 0xffa61010, 0xffe8c2c2, 0xffda6767, 0xffa60b0b, 0xffa81617, 0xffc6852e, 0xffd9652e, 0xffe12026, 0xffd08331, 0xffcf8b31, 0xffd2742f, 0xffd46d2e, 0xffce9032, 0xffe02426, 0xffa71313, 0xffaf2727, 0xfff6eaea, 0xffea9d9d, 0xffaa0a0a, 0xffaa1a17, 0xffc68b2f, 0xffcd5529, 0xffdf2026, 0xffe12827, 0xffd94f2b, 0xffdc3929, 0xffdd3429, 0xffdd3228, 0xffcd9933, 0xffb51b1b, 0xffbc4c4c, 0xfffbdede, 0xffb71f1f, 0xffa61313, 0xffc7862f, 0xffb95a25, 0xffb61319, 0xffe02627, 0xffd08130, 0xffd3732f, 0xffd2762f, 0xffd17b2f, 0xffd8532b, 0xffce9232, 0xffde2b27, 0xffdd2627, 0xffd08181, 0xffd76d6c, 0xffa40808, 0xffa71015, 0xffbf6728, 0xffc67f2d, 0xffa51115, 0xffad1718, 0xffe12527, 0xffe03429, 0xffcd9732, 0xffd9492b, 0xffcf8a32, 0xffd65f2d, 0xffd36f2e, 0xffd07e30, 0xffe02226, 0xffd82525, 0xffb31a1a, 0xfffbe3e3, 0xffba2b2a, 0xffa81216, 0xffb1341d, 0xffce9e34, 0xffb2391e, 0xffa60f15, 0xffb5161a, 0xffcd3c25, 0xffce9833, 0xffdf3929, 0xffe12427, 0xffce9432, 0xffd27c30, 0xffd3702f, 0xffb33333, 0xfff0c6c5, 0xffb01f1e, 0xffa71216, 0xffc2722b, 0xffc98b2f, 0xffaa1c18, 0xffa81517, 0xffb0371d, 0xffcc9632, 0xffc92f22, 0xffd82124, 0xffde3428, 0xffd17f30, 0xffd46c2e, 0xffd02322, 0xffb51b1a, 0xffcc7574, 0xffeecece, 0xffb23130, 0xffa81316, 0xffac2219, 0xffcb9432, 0xffbd6127, 0xffb0311c, 0xffcc9732, 0xffac2d1b, 0xffa91316, 0xffc31f1f, 0xffdb3728, 0xffdd422a, 0xffe32328, 0xffe12227, 0xffd4702f, 0xffe12126, 0xffd62424, 0xffa81111, 0xffeac3c2, 0xfff3e2e2, 0xffb94544, 0xffa30707, 0xffa81615, 0xffaf2d1b, 0xffb1321c, 0xffa81516, 0xffa81417, 0xffac2119, 0xffcc9532, 0xffb54320, 0xffa61016, 0xffaa1417, 0xffb4291c, 0xffc43c23, 0xffc81b1f, 0xffd02223, 0xffd42424, 0xffd72524, 0xffda1f25, 0xffd26f2e, 0xffd17d30, 0xffdc2126, 0xffda2626, 0xffc7201f, 0xffa71617, 0xffbc4646, 0xffcb7777, 0xffa6100f, 0xffc57c2c, 0xffc2712a, 0xffa81116, 0xffa81416, 0xffab2119, 0xffb13e1e, 0xffa41014, 0xffab1717, 0xffaa1116, 0xffbb5124, 0xffca8c30, 0xffae1a18, 0xffac1718, 0xffa60c0b, 0xffe3acac, 0xffe5bebd, 0xffb53a3a, 0xffa71011, 0xffa71016, 0xffb74a22, 0xffc6802d, 0xffa91817, 0xffaa1b18, 0xffcb9131, 0xffb74b22, 0xffb0321c, 0xffcc9832, 0xffae2c1b, 0xffa71316, 0xffc04f4e, 0xfffbf6f5, 0xffd79897, 0xffb12e2e, 0xffa71010, 0xffac1f18, 0xffb2391f, 0xffad251a, 0xffa91517, 0xffaa1b17, 0xffca9031, 0xffb95223, 0xffa70f15, 0xffa71211, 0xffac1c1c, 0xffefd1d0, 0xfff8f0f0, 0xffd69494, 0xffb33434, 0xffa50a0b, 0xffa81214, 0xffa71116, 0xffbf6928, 0xffc8882f, 0xffa60d0d, 0xffe0a7a6, 0xffe0b0b0, 0xffc05756, 0xffab1d1c, 0xffa81415, 0xffc06a29, 0xffd89797, 0xfff2dede, 0xffd59392, 0xffba4847, 0xffab1c1b, 0xffa40a09, 0xffa40b0b, 0xffa91515, 0xffa81817, 0xffdda5a4, 0xfff2dddd, 0xffdaa09f, 0xffc3605f, 0xffb33332, 0xffa71414, 0xffa50a0a, 0xffa60f0f, 0xffebcdcc, 0xffd99c9c, 0xffc76968, 0xffb73e3e, 0xffad2424, 0xffa81514, 0xffa81213, 0xffa60f10, 0xffba4746, 0xffdfacab, 0xfffdfafb, 0xfffdfcfc, 0xfff6e9e8, 0xffdea9a8, 0xffd18484, 0xffc66868, 0xffbd5050, 0xffad2323, 0xffaa1b1b, 0xffa71514, 0xffa60f0e, 0xffc25e5d, 0xffd69292, 0xffeed4d3, 0xfffdfcfb, 0xfffaf3f3, 0xfff5e7e7, 0xfff0d9d8, 0xffe9c5c5, 0xffe7c0bf, 0xffe6bfbe, 0xffe8c2c1, 0xffeacaca, 0xfff0d9d9, 0xfff7edec]
            );
        }
    }
}

/**-----------------------------------------------------
 * Use following BitmapPatternBuilder class 
 * 
 * DO NOT CHANGE any codes below this comment.
 *
 * -----------------------------------------------------
*/
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Graphics;
    
class BitmapPatternBuilder{
    /**
     * creates BitmapData filled with dot pattern.
     * First parameter is 2d array that contains color index for each pixels;
     * Second parameter contains color reference table.
     *
     * @parameter pattern:Array 2d array that contains color index for each pixel.
     * @parameter colors:Array 1d array that contains color table.
     * @returns BitmapData
     */
    public static function build(pattern:Array, colors:Array):BitmapData{
        var bitmapW:int = pattern[0].length;
        var bitmapH:int = pattern.length;
        var bmd:BitmapData = new BitmapData(bitmapW,bitmapH,true,0x000000);
        for(var yy:int=0; yy<bitmapH; yy++){
            for(var xx:int=0; xx<bitmapW; xx++){
                var color:int = colors[pattern[yy][xx]];
                bmd.setPixel32(xx, yy, color);
            }
        }
        return bmd;
    }
    
    /**
     * short cut function for Graphics.beginBitmapFill with pattern.
     */
    public static function beginBitmapFill(pattern:Array, colors:Array, graphics:Graphics):void{
        var bmd:BitmapData = build(pattern, colors);
        graphics.beginBitmapFill(bmd);
        bmd.dispose();        
    }
}